package com.hiultra.archive.domain.vo;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hiultra.archive.utils.sgsm.SM2Util;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: ls
 * @CreateTime: 2024/08/13  15:38
 * @Description: TODO
 * @Version: 1.0
 */
public class ParamClass {

    public static void main(String[] args) throws JsonProcessingException {
        //组借阅数据
//        List<ArchiveBorrowTaskIssuedVo> archiveBorrowTaskIssuedVoList= new ArrayList<>();
//        ArchiveBorrowTaskIssuedVo archiveStorageTaskIssuedVo =new ArchiveBorrowTaskIssuedVo();
//        archiveStorageTaskIssuedVo.setTaskId("1");
//        archiveStorageTaskIssuedVo.setBorrowOrgNo("14402");
//        archiveStorageTaskIssuedVo.setBorrowNo("JY001");
//        archiveStorageTaskIssuedVo.setBorrowUserType("1");
//        archiveStorageTaskIssuedVo.setBorrowUserName("李爽");
//        archiveStorageTaskIssuedVo.setBorrowPhone("17854112636");
//        archiveStorageTaskIssuedVo.setUtilizationMethod("2");
//        archiveStorageTaskIssuedVo.setBorrowType("2");
//        archiveStorageTaskIssuedVo.setBorrowDay("7");
//        archiveStorageTaskIssuedVo.setBorrowTime("20240113144455");
//        archiveStorageTaskIssuedVo.setEstimateTime("20240819180000");
//        archiveStorageTaskIssuedVo.setBorrowReason("测试借阅");
//        List<ArchiveBorrowTaskIssuedVo.ArchiveBorrowInfo> archiveBorrowInfoList = new ArrayList<>();
//        ArchiveBorrowTaskIssuedVo.ArchiveBorrowInfo archiveBorrowInfo = new ArchiveBorrowTaskIssuedVo.ArchiveBorrowInfo();
//        archiveBorrowInfo.setId("1");
//        archiveBorrowInfo.setTaskId("1");
//        archiveBorrowInfo.setRoomNo("s002");
//        archiveBorrowInfo.setCustNo("001");
//        archiveBorrowInfo.setCustName("李爽");
//        archiveBorrowInfo.setArchiveType("01");
//        archiveBorrowInfo.setArchiveName("资料1");
//        archiveBorrowInfo.setBoxNo("001");
//        archiveBorrowInfo.setHouseLocationNo("01010101010101");
//        archiveBorrowInfo.setOrderNo("123");
//        archiveBorrowInfo.setFlowName("借阅");
//        archiveBorrowInfo.setLibraryStatus("1");//在库状态1是2否
//        archiveBorrowInfoList.add(archiveBorrowInfo);
//
//        ArchiveBorrowTaskIssuedVo.ArchiveBorrowInfo archiveBorrowInfo1 = new ArchiveBorrowTaskIssuedVo.ArchiveBorrowInfo();
//        archiveBorrowInfo1.setId("2");
//        archiveBorrowInfo1.setTaskId("1");
//        archiveBorrowInfo1.setRoomNo("s002");
//        archiveBorrowInfo1.setCustNo("002");
//        archiveBorrowInfo1.setCustName("李爽2");
//        archiveBorrowInfo1.setArchiveType("02");
//        archiveBorrowInfo1.setArchiveName("资料2");
//        archiveBorrowInfo1.setBoxNo("001");
//        archiveBorrowInfo1.setHouseLocationNo("01010101010101");
//        archiveBorrowInfo1.setOrderNo("123");
//        archiveBorrowInfo1.setFlowName("借阅");
//        archiveBorrowInfo1.setLibraryStatus("1");//在库状态1是2否
//        archiveBorrowInfoList.add(archiveBorrowInfo1);
//
//        archiveStorageTaskIssuedVo.setBorrowInfoList(archiveBorrowInfoList);
//        archiveBorrowTaskIssuedVoList.add(archiveStorageTaskIssuedVo);

        //组销毁数据

//        // 将JsonData对象转换为JSON字符串
//        String jsonString = new ObjectMapper().writeValueAsString(generateBoxMoveData());
//        // System.out.println(jsonString);
//
//        //加密
//        String pubKey = "04ac253373f255a68ba0f9fe09e365fadd6c19e9c15b18497aaa6aa11e1097be16e94a648a20e4a60ab60d5c2a1c4f03a1e6d65ddd376cfdab895a4b1d444558dc";
//        String encryptedData = new SM2Util().encryptBySM2(jsonString, pubKey);
//
//        System.out.println(encryptedData);
//        String decryptedResult = new SM2Util().decryptBySM2(encryptedData, "6c44b77e9e17e21c13afa1bb33afde166a229a53d34158d2e64ddb8fd4444ff5");
//        System.out.println(decryptedResult);
    }

//    public static HouseLocationNoInfoIssuedVo genHouseLocationNoInfoIssuedVo(){
//        //库位下发组数据
//        HouseLocationNoInfoIssuedVo houseLocationNoInfoVo = new HouseLocationNoInfoIssuedVo();
//        houseLocationNoInfoVo.setOrgNo("14402");
//        houseLocationNoInfoVo.setRoomNo("3501");
//        houseLocationNoInfoVo.setRoomName("定襄档案室");
//        houseLocationNoInfoVo.setRoomLevel("1");
//        houseLocationNoInfoVo.setRoomStatus("1");
//        houseLocationNoInfoVo.setRoomStruc("1");
//        HouseLocationNoInfoIssuedVo.BoxRuleInfo boxRuleInfo = new HouseLocationNoInfoIssuedVo.BoxRuleInfo();
//        boxRuleInfo.setArchType("1");
//        boxRuleInfo.setMaxUserNum("15");
//        HouseLocationNoInfoIssuedVo.ArchArea archArea = new HouseLocationNoInfoIssuedVo.ArchArea();
//        archArea.setArchAreaNo("01");
//        archArea.setArchAreaName("测试档案区");
//        archArea.setArchType("1");
//
//        List<HouseLocationNoInfoIssuedVo.Cabinet> cabinetList = new ArrayList<>();
//        HouseLocationNoInfoIssuedVo.Cabinet cabinet = new HouseLocationNoInfoIssuedVo.Cabinet();
//        cabinet.setId("1");
//        cabinet.setColNo("01");
//        cabinet.setSecNum("5");
//        cabinet.setLayNum("2");
//        cabinet.setBoxNum("15");
//        HouseLocationNoInfoIssuedVo.Cabinet cabinet2 = new HouseLocationNoInfoIssuedVo.Cabinet();
//        cabinet2.setId("2");
//        cabinet2.setColNo("02");
//        cabinet2.setSecNum("5");
//        cabinet2.setLayNum("2");
//        cabinet2.setBoxNum("15");
//        HouseLocationNoInfoIssuedVo.Cabinet cabinet3 = new HouseLocationNoInfoIssuedVo.Cabinet();
//        cabinet3.setId("3");
//        cabinet3.setColNo("03");
//        cabinet3.setSecNum("5");
//        cabinet3.setLayNum("2");
//        cabinet3.setBoxNum("15");
//        cabinetList.add(cabinet);
//        cabinetList.add(cabinet2);
//        cabinetList.add(cabinet3);
//        archArea.setCabinetList(cabinetList);
//        List<HouseLocationNoInfoIssuedVo.ArchArea> archAreaList = new ArrayList<>();
//        archAreaList.add(archArea);
//
//        List<HouseLocationNoInfoIssuedVo.BoxRuleInfo> boxRuleInfoList = new ArrayList<>();
//        boxRuleInfoList.add(boxRuleInfo);
//        houseLocationNoInfoVo.setBoxRuleInfoList(boxRuleInfoList);
//        houseLocationNoInfoVo.setArchAreaList(archAreaList);
//        return houseLocationNoInfoVo;
//    }
//
//    //入库
//    public static  List<ArchiveStorageTaskIssuedVo> genArchiveStorageTaskIssuedVo(){
//
//        List<ArchiveStorageTaskIssuedVo> archiveStorageTaskIssuedVoList = new ArrayList<>();
//        //入库组数据
//        ArchiveStorageTaskIssuedVo archiveStorageTaskIssuedVo = new ArchiveStorageTaskIssuedVo();
//        archiveStorageTaskIssuedVo.setTaskId("1");
//        archiveStorageTaskIssuedVo.setOrgNo("14402");
//        archiveStorageTaskIssuedVo.setWarehousingNo("RK001");
//        archiveStorageTaskIssuedVo.setRoomNo("s002");
//        archiveStorageTaskIssuedVo.setHouseNo("21");
//        archiveStorageTaskIssuedVo.setAreaNo("01");
//        archiveStorageTaskIssuedVo.setCabinetNo("01");
//
//        //档案盒
//        ArchiveStorageTaskIssuedVo.ArchiveBox archiveBox = new ArchiveStorageTaskIssuedVo.ArchiveBox();
//        archiveBox.setBoxBarCode("11111111");
//        archiveBox.setBoxNo("001");
//        archiveBox.setId("1");
//        archiveBox.setTaskId("1");
//        archiveBox.setHouseLocationNo("01010101010101");
//        ArchiveStorageTaskIssuedVo.Archive archive = new ArchiveStorageTaskIssuedVo.Archive();
//        archive.setId("1");
//        archive.setTaskId("1");
//        archive.setTaskBoxId("1");
//        archive.setCustNo("001");
//        archive.setCustName("李爽");
//        archive.setUserType("01");
//        archive.setIsImporCust("1");
//        archive.setArchName("资料1");
//        ArchiveStorageTaskIssuedVo.Archive archive1 = new ArchiveStorageTaskIssuedVo.Archive();
//        archive1.setId("2");
//        archive1.setTaskId("1");
//        archive1.setTaskBoxId("1");
//        archive1.setCustNo("002");
//        archive1.setCustName("李爽2");
//        archive1.setUserType("02");
//        archive1.setIsImporCust("1");
//        archive1.setArchName("资料2");
//
//        List<ArchiveStorageTaskIssuedVo.Archive> archiveList = new ArrayList<>();
//        archiveList.add(archive);
//        archiveList.add(archive1);
//        archiveBox.setArchList(archiveList);
//
//        List<ArchiveStorageTaskIssuedVo.ArchiveBox> archiveBoxList = new ArrayList<>();
//        archiveBoxList.add(archiveBox);
//        archiveStorageTaskIssuedVo.setBoxList(archiveBoxList);
//
//        //第二组
//        //入库组数据
//        ArchiveStorageTaskIssuedVo archiveStorageTaskIssuedVo11 = new ArchiveStorageTaskIssuedVo();
//        archiveStorageTaskIssuedVo11.setTaskId("2");
//        archiveStorageTaskIssuedVo11.setOrgNo("14402");
//        archiveStorageTaskIssuedVo11.setWarehousingNo("RK001");
//        archiveStorageTaskIssuedVo11.setRoomNo("s002");
//        archiveStorageTaskIssuedVo11.setHouseNo("21");
//        archiveStorageTaskIssuedVo11.setAreaNo("01");
//        archiveStorageTaskIssuedVo11.setCabinetNo("02");
//
//        //档案盒
//        ArchiveStorageTaskIssuedVo.ArchiveBox archiveBox11 = new ArchiveStorageTaskIssuedVo.ArchiveBox();
//        archiveBox11.setBoxBarCode("22222222");
//        archiveBox11.setBoxNo("002");
//        archiveBox11.setId("2");
//        archiveBox11.setTaskId("1");
//        archiveBox11.setHouseLocationNo("01010101010102");
//        ArchiveStorageTaskIssuedVo.Archive archive11 = new ArchiveStorageTaskIssuedVo.Archive();
//        archive11.setId("3");
//        archive11.setTaskId("2");
//        archive11.setTaskBoxId("2");
//        archive11.setCustNo("003");
//        archive11.setCustName("李爽3");
//        archive11.setUserType("01");
//        archive11.setIsImporCust("1");
//        archive11.setArchName("资料3");
//        ArchiveStorageTaskIssuedVo.Archive archive12 = new ArchiveStorageTaskIssuedVo.Archive();
//        archive12.setId("4");
//        archive12.setTaskId("2");
//        archive12.setTaskBoxId("2");
//        archive12.setCustNo("004");
//        archive12.setCustName("李爽4");
//        archive12.setUserType("02");
//        archive12.setIsImporCust("1");
//        archive12.setArchName("资料4");
//
//        List<ArchiveStorageTaskIssuedVo.Archive> archiveList11 = new ArrayList<>();
//        archiveList11.add(archive11);
//        archiveList11.add(archive12);
//        archiveBox11.setArchList(archiveList11);
//
//        List<ArchiveStorageTaskIssuedVo.ArchiveBox> archiveBoxList11 = new ArrayList<>();
//        archiveBoxList11.add(archiveBox11);
//        archiveStorageTaskIssuedVo11.setBoxList(archiveBoxList11);
//
//        archiveStorageTaskIssuedVoList.add(archiveStorageTaskIssuedVo);
//        archiveStorageTaskIssuedVoList.add(archiveStorageTaskIssuedVo11);
//        return archiveStorageTaskIssuedVoList;
//    }
//    public static ArchiveDesTaskIssuedVo generateMockData() {
//        ArchiveDesTaskIssuedVo archiveDesTaskVo = new ArchiveDesTaskIssuedVo();
//
//        // Set task details
//        archiveDesTaskVo.setTaskId("1");
//        archiveDesTaskVo.setDesNo("XH001");
//        archiveDesTaskVo.setDesName("销毁测试");
//        archiveDesTaskVo.setDesAccomBy("001");
//        archiveDesTaskVo.setDesContent("测试销毁");
//
//        // Generate ArchiveUserInfo list
//        List<ArchiveDesTaskIssuedVo.ArchiveUserInfo> archiveUserInfoList = new ArrayList<>();
//        ArchiveDesTaskIssuedVo.ArchiveUserInfo userInfo1 = new ArchiveDesTaskIssuedVo().new ArchiveUserInfo();
//        userInfo1.setId("1");
//        userInfo1.setTaskId("1");
//        userInfo1.setCustNo("001");
//        userInfo1.setRoomNo("s002");
//        userInfo1.setRoomName("定襄档案室");
//        userInfo1.setCustName("李爽");
//        userInfo1.setCanceTime("20240815150422");
//        userInfo1.setDesStatus("2");
//        userInfo1.setDesTime("20240815150422");
//        userInfo1.setDesBy("");
//
//        // Generate DesArchive list for ArchiveUserInfo
//        List<ArchiveDesTaskIssuedVo.DesArchive> desArchiveList = new ArrayList<>();
//        ArchiveDesTaskIssuedVo.DesArchive desArchive1 = new ArchiveDesTaskIssuedVo().new DesArchive();
//        desArchive1.setId("1");
//        desArchive1.setTaskId("1");
//        desArchive1.setDesUserId("1");
//        desArchive1.setArchNo("001");
//        desArchive1.setArchName("资料1");
//        desArchive1.setHouseLocationNo("0101010101");
//        desArchive1.setRoomNo("s002");
//        desArchive1.setRoomName("定襄档案室");
//        desArchive1.setAreaNo("01");
//        desArchive1.setBoxNo("001");
//        desArchive1.setBagNo("001");
//        desArchive1.setDesStatus("2");
//
//        desArchiveList.add(desArchive1);
//        userInfo1.setDesArchiveList(desArchiveList);
//
//        archiveUserInfoList.add(userInfo1);
//        archiveDesTaskVo.setArchiveUserInfoList(archiveUserInfoList);
//
//        return archiveDesTaskVo;
//    }

//    public static ArchiveBoxMoveTaskIssuedVo generateBoxMoveData() {
//
//        ArchiveBoxMoveTaskIssuedVo task1 = new ArchiveBoxMoveTaskIssuedVo();
//        task1.setOrgNo("141414");
//        task1.setRoomNo("s002");
//        task1.setTaskId("1");
//        task1.setBoxMoveNo("HYW01");
//        task1.setIssued("20240815150422");
//
//        ArchiveBoxMoveTaskIssuedVo.BoxMoveInfo boxMoveInfo1 = task1.new BoxMoveInfo();
//        boxMoveInfo1.setId("1");
//        boxMoveInfo1.setTaskId("1");
//        boxMoveInfo1.setBoxNo("001");
//        boxMoveInfo1.setOldHouseLocationNo("01010101010101");
//        boxMoveInfo1.setNewHouseLocationNo("01010101010103");
//        boxMoveInfo1.setBoxFullStatus("1");
//
//        List<ArchiveBoxMoveTaskIssuedVo.BoxMoveInfo> boxMoveInfoList = new ArrayList<>();
//        boxMoveInfoList.add(boxMoveInfo1);
//
//        task1.setBoxMoveList(boxMoveInfoList);
//
//        return task1;
//    }
//
//    public static ArchiveBoxinnerMoveTaskIssuedVo genArchiveBoxinnerMoveTaskIssuedVo() {
//        ArchiveBoxinnerMoveTaskIssuedVo archiveVo = new ArchiveBoxinnerMoveTaskIssuedVo();
//        archiveVo.setTaskId("1");
//        archiveVo.setOrgNo("1414");
//        archiveVo.setRoomNo("S002");
//        archiveVo.setArchMoveNo("HJYW001");
//        archiveVo.setIssued("20240816153322");
//
//        List<ArchiveBoxinnerMoveTaskIssuedVo.ArchMoveInfo> archMoveList = new ArrayList<>();
//        ArchiveBoxinnerMoveTaskIssuedVo.ArchMoveInfo archMoveInfo = new ArchiveBoxinnerMoveTaskIssuedVo().new ArchMoveInfo();
//        archMoveInfo.setId("1");
//        archMoveInfo.setTaskId("1");
//        archMoveInfo.setFlowName("流程");
//        archMoveInfo.setArchNo("001");
//        archMoveInfo.setArchName("资料1");
//        archMoveInfo.setArchNum("1");
//        archMoveInfo.setRuleName("规则1");
//        archMoveInfo.setOldBoxNo("001");
//        archMoveInfo.setOldBagNo("001");
//        archMoveInfo.setOldHouseLocationNo("010101010202");
//        archMoveInfo.setNewBoxNo("002");
//        archMoveInfo.setNewBagNo("002");
//        archMoveInfo.setNewHouseLocationNo("010101010202");
//        archMoveInfo.setOldBoxFullStatus("1");
//        archMoveInfo.setNewBoxFullStatus("1 ");
//
//        archMoveList.add(archMoveInfo);
//        archiveVo.setArchMoveList(archMoveList);
//        return archiveVo;
//    }

//    public static ArchiveStocktakingTaskIssuedVo genArchiveStocktakingTaskIssuedVo() {
//        ArchiveStocktakingTaskIssuedVo inventoryTask = new ArchiveStocktakingTaskIssuedVo();
//        inventoryTask.setTaskId("1");
//        inventoryTask.setOrgNo("1414");
//        inventoryTask.setInventoryNo("PD001");
//        inventoryTask.setInventoryContent("盘点测试");
//        inventoryTask.setInventoryDate("20240816171125");
//        inventoryTask.setCabinetNum("1");
//        inventoryTask.setBoxNum("1");
//        inventoryTask.setInventoryBy("001");
//
//        List<ArchiveStocktakingTaskIssuedVo.ArchiveCabinet> cabinetList = new ArrayList<>();
//        ArchiveStocktakingTaskIssuedVo.ArchiveCabinet cabinet = inventoryTask.new ArchiveCabinet();
//        cabinet.setId("1");
//        cabinet.setTaskId("1");
//        cabinet.setRoomNo("s002");
//        cabinet.setAreaNo("01");
//        cabinet.setCabinetNo("01");
//
//        cabinetList.add(cabinet);
//        inventoryTask.setCabinetList(cabinetList);
//        return inventoryTask;
//    }

//    //组转存档案任务数据
//    public static ArchiveUploadTaskIssuedVo genArchiveUploadTaskIssuedVo() {
//        ArchiveUploadTaskIssuedVo task = new ArchiveUploadTaskIssuedVo();
//        task.setTaskId("1");
//        task.setOrgNo("1414");
//        task.setTransferOrgNo("1415");
//        task.setTransferNo("ZC001");
//        task.setStatus("1");
//        task.setTransferOutRoomNo("1414");
//        task.setTransferInRoomNo("1415");
//        task.setBoxNum("1");
//        task.setBagNum("1");
//        task.setArchNum("2");
//        task.setAppReason("转存测试");
//
//        // Generating sample data for ArchiveBox
//        List<ArchiveUploadTaskIssuedVo.ArchiveBox> boxList = new ArrayList<>();
//        ArchiveUploadTaskIssuedVo.ArchiveBox box1 = new ArchiveUploadTaskIssuedVo.ArchiveBox();
//        box1.setId("1");
//        box1.setTaskId("1");
//        box1.setCustNo("001");
//        box1.setBoxBarCode("11111111");
//        box1.setBoxNo("001");
//        box1.setHouseLocationNo("0010010101");
//        box1.setInHouseLocationNo("0010010102");
//        boxList.add(box1);
//
//        // Generating sample data for ArchiveBag
//        List<ArchiveUploadTaskIssuedVo.ArchiveBag> bagList = new ArrayList<>();
//        ArchiveUploadTaskIssuedVo.ArchiveBag bag1 = new ArchiveUploadTaskIssuedVo.ArchiveBag();
//        bag1.setId("1");
//        bag1.setTaskId("1");
//        bag1.setCustNo("001");
//        bag1.setBagCode("001");
//        bag1.setBagNo("001");
//        bag1.setBoxNo("001");
//        bag1.setHouseLocationNo("location3");
//        bag1.setInBoxNo("box002");
//        bag1.setInHouseLocationNo("location4");
//        bagList.add(bag1);
//
//        // Generating sample data for Archive
//        List<ArchiveUploadTaskIssuedVo.Archive> archList = new ArrayList<>();
//        ArchiveUploadTaskIssuedVo.Archive arch1 = new ArchiveUploadTaskIssuedVo.Archive();
//        arch1.setId("1");
//        arch1.setTaskId("1");
//        arch1.setCustNo("001");
//        arch1.setArchNo("001");
//        arch1.setArchName("资料1");
//        arch1.setBoxNo("001");
//        arch1.setHouseLocationNo("0010010101");
//        arch1.setInBoxNo("21");
//        arch1.setInHouseLocationNo("0010010102");
//
//        ArchiveUploadTaskIssuedVo.Archive arch2 = new ArchiveUploadTaskIssuedVo.Archive();
//        arch2.setId("2");
//        arch2.setTaskId("1");
//        arch2.setCustNo("002");
//        arch2.setArchNo("003");
//        arch2.setArchName("资料3");
//        arch2.setBoxNo("003");
//        arch2.setHouseLocationNo("0010010103");
//        arch2.setInBoxNo("21");
//        arch2.setInHouseLocationNo("0010010104");
//        archList.add(arch2);
//        archList.add(arch1);
//
//        // Setting the generated data into the task object
//        task.setBoxList(boxList);
//        task.setBagList(bagList);
//        task.setArchList(archList);
//
//        return task;
//    }
}
